<template>
  <div class="table-box">
    <div class="operation-box">
      <div class="input-box">
        任务编号：
        <el-input
          v-model="search"
          placeholder="请输入关键字"
          class="input__item"
        />
        <el-button type="danger">查询</el-button>
      </div>

      <el-button type="primary"> 导出EXCEL </el-button>
    </div>

    <el-table
      :data="tableData"
      stripe
      border
      table-layout="auto"
      style="max-width: 100vw; min-width: 1000px"
    >
      <el-table-column prop="id" label="任务编号" />
      <el-table-column prop="task" label="任务名称" />
      <el-table-column prop="route" label="线路编号(起始杆号-终止杆号)" />
      <el-table-column prop="towerId" label="杆塔编号" />
      <el-table-column prop="level" label="缺陷级别" />
      <el-table-column prop="type" label="缺陷类型" />
      <el-table-column prop="time" label="发现时间" />
      <el-table-column prop="detail" label="缺陷描述" />
    </el-table>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";

const search = ref("");

const tableData = ref([
  {
    id: "RW0245",
    task: "西渭一线任务巡检",
    route: "XW001（xw0001-xw00256）",
    towerId: "XW00001",
    level: "一般",
    type: "叉梁断裂",
    time: "2013/11/12",
    detail: "主河道叉粱断裂痕迹",
  },
  {
    id: "RW0245",
    task: "西渭一线任务巡检",
    route: "XW001（xw0001-xw00256）",
    towerId: "XW00001",
    level: "一般",
    type: "叉梁断裂",
    time: "2013/11/12",
    detail: "主河道叉粱断裂痕迹",
  },
  {
    id: "RW0245",
    task: "西渭一线任务巡检",
    route: "XW001（xw0001-xw00256）",
    towerId: "XW00001",
    level: "一般",
    type: "叉梁断裂",
    time: "2013/11/12",
    detail: "主河道叉粱断裂痕迹",
  },
  {
    id: "RW0245",
    task: "西渭一线任务巡检",
    route: "XW001（xw0001-xw00256）",
    towerId: "XW00001",
    level: "一般",
    type: "叉梁断裂",
    time: "2013/11/12",
    detail: "主河道叉粱断裂痕迹",
  },
]);
</script>

<style scoped>
.table-box {
  width: fit-content;
  margin: 0 auto;
}

.operation-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-box {
  color: #747070;
  font-size: 14px;
}

.input__item {
  width: 250px;
  margin: 10px;
}
</style>
